﻿@model Weibo.Web.Models.AtMeModel
           @{
    var border = "";
    if(Model.CurUserConfig.IsThemeDIY==1){
        ThemeDIY diy = Themes.GetThemeDIYByUID(Model.CurUser.ID);
        border = diy.BorderStyle+"Bg";
    }
    ViewData["curBorder"] = border;
 }
  @{
     Layout = "~/Views/Shared/_Layout.cshtml";
 }
 @{
     ViewBag.Title = "@我的微博 XX微博-随时随地分享身边的新鲜事儿";
 }
 @section  cssInsert{
    <link rel="stylesheet" type="text/css" href="/Content/CSS/miniblog/index.css" />
    
    <link rel="stylesheet" type="text/css" href="@Model.CurSkinCss" />
	<link rel="stylesheet" type="text/css" href="/Content/CSS/miniblog/layer.css" />
    }
@section  jsInsert{    
    <script type="text/javascript">
        var curBorder = "@border";
    </script>
    <script src="/Swfupload/swfupload.js" type="text/javascript"></script>
    <script src="/Swfupload/swfupload.cookies.js" type="text/javascript"></script>
    <script src="/Swfupload/swfupload.queue.js" type="text/javascript"></script>
    <script src="/Swfupload/fileprogress.js" type="text/javascript" charset="GB2312"></script>
    <script src="/Swfupload/handler.js" type="text/javascript" charset="GB2312"></script>
    <script src="/Scripts/MiniBlog.js" type="text/javascript"></script>
    <script src="/Scripts/DatePicker.js" type="text/javascript"></script>
    }

            <div class="MIB_blogbody">
                <div class="MIB_mblogbgr @border">
                    <div class="MIB_mblogbgl">
                        <div class="mainR MIB_200 MIB_txtar MIB_linkar">
                             @RenderPage("~/Views/Shared/_userInfo.cshtml")
                             @RenderPage("~/Views/Shared/_rightNav.cshtml") 
                             @RenderPage("~/Views/Shared/Wedget_MyFan.cshtml")
                             @RenderPage("~/Views/Shared/Wedget_MyFollow.cshtml")
                        </div>
                        <div id="indexMainL" class="mainL MIB_600 MIB_txtal MIB_linkal">
                            <div class="MIB_mbloghead">
                                <div class="MIB_mblogbox">
                                    <div class="postWrap">
                                        <div class="pngBg">
                                            <div class="postOptionBg">
                                            </div>
                                            <div class="pngGuidBg">
                                            </div>
                                            <div class="pngAreaBg">
                                            </div>
                                        </div>
                                        <div class="connBg">
                                            <div id="publisher_info" class="wordNumBg">
                                                你还可以输入<span class="pipsLim">140</span>字</div>
                                            <div class="postOptionBg">
                                                <div id="publisher_faces" class="OnTit">
                                                    <img title="表情" class="small_icon faceicon" src="/Content/Image/transparent.gif">
                                                    <a tabindex="2" href="javascript:void(0)">表情</a>
                                                </div>
                                                <div id="publisher_pic" class="OnPic">
                                                    <span poptype="1" pop="true" id="publisher_image">
                                                        <img title="图片" class="small_icon picnormal" src="/Content/Image/fbqimgclose.gif"><a
                                                            tabindex="3" href="####">图片</a> </span>
                                                </div>
                                                <div id="publisher_video" class="OnTit">
                                                    <img class="small_icon videoicon" title="视频" src="/Content/Image/transparent.gif"><a
                                                        tabindex="4" href="javascript:void(0);">视频</a>
                                                </div>
                                                <div id="publisher_music" class="OnTit">
                                                    <img class="small_icon musicico" title="音乐" src="/Content/Image/transparent.gif"><a
                                                        tabindex="5" href="javascript:void(0);">音乐</a>
                                                </div>
                                                <div id="publisher_topic" class="OnTit">
                                                    <img class="small_icon askico" title="话题" src="/Content/Image/transparent.gif"><a
                                                        tabindex="6" href="javascript:void(0);">话题</a>
                                                </div>
                                                <div class="OnTit" id="publisher_vote">
                                                    <img src="/Content/Image/transparent.gif" class="small_icon voteicon" title="投票"><a
                                                        tabindex="7" href="javascript:void(0);">投票</a>
                                                </div>
                                            </div>
                                            <div class="postBtnBg bgColorA_No">
                                                <a title="" tabindex="8" id="publisher_submit" href="javascript:void(0);"></a>
                                            </div>
                                            <div style="display: block" class="inputarea">
                                                <label style="display: none;" for="publish_editor">
                                                    微博输入框</label>
                                                <textarea title="" id="publish_editor" rows="" cols="" name="" accesskey="1" tabindex="1"
                                                    style="font-family: Tahoma,宋体; border-style: solid; border-width: 0px; word-wrap: break-word;
                                                    font-size: 14px; line-height: 18px; overflow-x: hidden;" range="0&0"></textarea>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="MIB_mbloglist">
                                <div class="atme_filter1" id="atme_filter">
								<div style="display:@(Model.IsFollow > 0 || Model.IsOri > 0||!string.IsNullOrEmpty(Model.Key) ? "none" : "block");" class="atmef_con1 clearFix" id="atmeBar">
							      	<ul class="lf">
							      		<li class="cur"><b>@@提到我的微博</b></li>
							      		<li><a href="/Comment/atmecmt/">@@提到我的评论</a></li>
							      	</ul>
							      	<i style="display:none;" id="new_msg1" class="atmef_num2">0</i>
							      	<div class="rt">
							      		<span><a href="/setup/notice">设置@提醒范围</a></span>
							      		<span class="atmef_arr"><a href="javascript:void(0)" id="startFilter"><em>微博筛选</em><i>&gt;</i></a></span>
							      	</div>
					      		</div>
					      		
					      		<div style="display: @(Model.IsFollow > 0 || Model.IsOri > 0||!string.IsNullOrEmpty(Model.Key) ? "block" : "none");" class="atmef_con1 clearFix" id="atmeFilter">
							      	<ul class="lf">
							      		<li class="cur"><b>@@提到我的微博</b></li>
							      		<li><a href="/Comment/atmecmt/">@@提到我的评论</a></li>
							      	</ul>
							      	<div class="rt">
							      		<span><a href="/setup/notice">设置@提醒范围</a></span>
							      		<span class="atmef_arr"><a href="@(Model.IsFollow > 0 || Model.IsOri > 0 || !string.IsNullOrEmpty(Model.Key) ? "/Miniblog/atme" : "javascript:void(0);")" id="cancelFilter" class="exp"><em>取消筛选</em><i>&lt;</i></a></span>
							      	</div>
							      	<div class="atmef_con2">
							      		<table>
							      			<tbody><tr>
							      				<th>按作者：</th>
							      				<td><input type="radio"   @(Model.IsFollow==0?"checked":"") id="typef1" value="0" name="arelation"><label for="typef1">所有用户</label></td>
							      				<td><input type="radio" @(Model.IsFollow>0?"checked":"") id="typef2" value="1" name="arelation"><label for="typef2">关注的人</label></td>
							      				<td></td>
							      			</tr>
							      			<tr>
							      				<th>按类型：</th>
							      				<td><input type="radio" @(Model.IsOri==0?"checked":"") id="typef3" value="0" name="atype"><label for="typef3">所有微博</label></td>
							      				<td><input type="radio"  @(Model.IsOri>0?"checked":"") id="typef4" value="1" name="atype"><label for="typef4">原创的微博</label></td>
							      				<td></td>
							      			</tr>
                                            <tr>
							      				<th>按关键字：</th>
							      				<td> <input type="text" name="searchkeyword" id="searchkeyword" value="@(string.IsNullOrEmpty(Model.Key) ? "查找@我微博" : Model.Key)"style="color: rgb(153, 153, 153);"></td>
							      				<td><a class="btn_normal" id="search_btn" href="javascript:void(0)"><em>筛选</em></a></td>
							      				<td></td>
							      			</tr>
                                           
							      		</tbody></table>
							      	</div>
						      	</div>
                                <script type="text/javascript">
                                    var atmeSearch = function () {
                                        var url = window.location.href;
                                        if ($("#searchkeyword").val() != "查找@我微博" && $.trim($("#searchkeyword").val())) {
                                            url = App.AddQueryToUrl(url, "Key", encodeURIComponent($.trim($("#searchkeyword").val())));
                                        } else {
                                            url = App.RemoveQueryFromUrl(url, "Key");
                                        }
                                        if ($("input[name='arelation']:checked").val() == 1) {
                                            url = App.AddQueryToUrl(url, "IsFollow", "1");
                                        }
                                        else {
                                            url = App.RemoveQueryFromUrl(url, "IsFollow");
                                        }
                                        if ($("input[name='atype']:checked").val() == 1) {
                                            url = App.AddQueryToUrl(url, "IsOri", "1");
                                        } else {
                                            url = App.RemoveQueryFromUrl(url, "IsOri");
                                        }
                                        window.location.href = url;
                                    }
                                    $("#startFilter").click(function () {
                                        $("#atmeFilter").fadeIn();
                                        $("#atmeBar").hide();
                                    });
                                    $("#cancelFilter").click(function () {
                                        $("#atmeFilter").fadeOut(function () { $("#atmeBar").show(); });

                                    });
                                    $("#searchkeyword").JQP_HighLineInput2({ nullCon: "查找@我微博" }).keyup(function (e) {
                                        if (e.which == 13) {
                                            atmeSearch();
                                        }
                                    });
                                    $("#search_btn").click(function () {
                                        atmeSearch();
                                    });
                                </script>
								<div class="atmef_con4">
					      			<p class="more">共<span id="atcountnum">@{@Model.RecordCount;}</span>条</p>
					      		</div>
							</div>
                                <ul id="feed_list" class="MIB_feed" iswrite="1" _num="15">
                                    @{
                                        if (Model.MiniBlogs != null)
                                        {
                                            foreach (Weibo.Entity.MiniBlog m in Model.MiniBlogs)
                                            {
                                                if (m != null)
                                                {
                                                    var dateSpan = DateSpan.Get(m.CreateTime);
                                                    From from = Froms.GetFromByID(m.FromID);
                                                    var user = Users.GetUserByID(m.UID);
                                                    var content = MiniBlogs.BBCodeToHtml(m.RealContent);
                                                    string[] media = m.MediaContent.Split(',');
                                                    if (user != null)
                                                    {
                                        <li id="mid_@{@m.ID;}" class="MIB_linedot_l">
                                            <div class="head_pic">
                                                <a href="/@{@user.ID;}" uid="@{@user.ID;}" namecard="true" uname="@{@user.NickName;}" >
                                                    <img src="@{@user.MidAvartar;}" 
                                                    title="@{@user.NickName;}" /></a>
                                            </div>
                                            <div class="MIB_feed_c">
                                                <p  mid="@{@m.ID;}" class="sms">
												
												<a title="@{@user.NickName;}" href="/@{@user.ID;}" uid="@{@user.ID;}" namecard="true"  uname="@{@user.NickName;}">@{@user.NickName;}</a>：@{@MvcHtmlString.Create(string.IsNullOrEmpty(Model.Key) ? content : HighLineHelper.HighLine(content, Model.Key));}
                                                </p>
                                                @{
                                                                                         if (m.IsOriginal == 1 && m.OriginalMID < 0)
                                                                                         {
                                                    <div id="prev_@{@m.ID;}" class="feed_preview" style="">
                                                        @{
                                                                         if (media[0] != "-1")
                                                                         {

                                                            <div class="feed_img">
                                                                <a href="javascript:;" onclick="App.scaleImg(this,'@{@m.ID;}');return false;">
                                                                    <img  class="imgicon" src="@{@media[4];}" /></a>
                                                                <img src="/Content/Image/loading.gif" style="position: absolute; background-color: transparent;
                                                                    border: 0px none; width: 16px; height: 16px; z-index: 1001; display: none;" />
                                                            </div>
                                                                         }
                                                                         if (media[1] != "-1")
                                                                         {
    
                                                            <div class="feed_img" type="video" vid="@{@media[1];}" mid="@{@m.ID;}" style="width: 120px; height: 90px;">
                                                                <a onclick="return false;" href="javascript:void(0);">
                                                                    <img width="120" height="90" style="cursor: pointer;" class="imgicon"
                                                                    src="@{@media[5];}" /></a><img src="/Content/Image/feedvideoplay.gif" onmouseover="App.mouseoverIco(this);" onmouseout="App.mouseoutIco(this);" style="cursor: pointer;
                                                                        display: block; margin-top: -61.5px; margin-left: 43.5px; opacity: 0.5; filter: alpha(opacity=50);" /></div>
                                                             
                                                                         }
                                                                         if (media[2] != "-1")
                                                                         {
                                                            <div class="feed_img" type="music" musicid="@{@media[2];}" mid="@{@m.ID;}" style="width: 135px; height: 33px;">
                                                                <a onclick="return false;" href="javascript:void(0);">
                                                                    <img style="cursor: pointer;" class="imgicon" src="/Content/Image/music_s.gif" /></a></div>
                                                                         }
                                                                         if (media[3] != "-1")
                                                                         {
                                                             if(!string.IsNullOrEmpty(media[6]))
                                                                                 
                                                                             {
                                                            <div class="feed_img" type="vote" voteid="@{@media[3];}" mid="@{@m.ID;}" >
                                                                <a onclick="return false;" href="javascript:void(0);">
                                                                    <img style="cursor: pointer;" class="imgicon" src="@{@media[6];}" /></a><img  onmouseover="App.mouseoverIco(this);" onmouseout="App.mouseoutIco(this);" src="/Content/Image/vote_picicon_01.gif"
                                                                        style="cursor: pointer; display: none;
                                                                        opacity: 0.5; filter: alpha(opacity=50);"></div>
                                                        
                                                                             }
                                                             else
                                                             {
                                                            <div class="feed_img" type="vote" voteid="@{@media[3];}" mid="@{@m.ID;}" style="width: 120px; height: 90px;">
                                                                <a onclick="return false;" href="javascript:void(0);">
                                                                    <img style="cursor: pointer;" class="imgicon" src="/Content/Image/vote_pic_01.gif" /></a></div>
                                                             }
                                                                         }
                                                        }
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                    <div style="display: none;" id="disp_@{@m.ID;}" class="MIB_assign">
                                                    </div>
                                                                                         }
                                                                                         else
                                                                                         {
                                                                                             MiniBlog oriMBlog = MiniBlogs.GetMiniBlogByID(m.OriginalMID);
                                                                                             if (oriMBlog != null)
                                                                                             {
                                                                                                 var odateSpan = DateSpan.Get(oriMBlog.CreateTime);
                                                                                                 From ofrom = Froms.GetFromByID(oriMBlog.FromID);

                                                                                                 var ocontent = MiniBlogs.BBCodeToHtml(oriMBlog.RealContent);
                                                                                                 string[] omedia = oriMBlog.MediaContent.Split(',');
                                                                                                 User oriUser = Users.GetUserByID(oriMBlog.UID);
                                                                                                 if (oriUser != null)
                                                                                                 {
                                                                                                     
                                                    <div class="MIB_assign">
                                                        <div class="MIB_asarrow_l">
                                                        </div>
                                                        <div class="MIB_assign_t">
                                                        </div>
                                                        <div class="MIB_assign_c MIB_txtbl">
                                                            <p  mid="@{@m.ID;}" class="source"><a href="/@{@oriUser.ID;}" uid="@{@oriUser.ID;}" namecard="true" uname="@{@oriUser.NickName;}" >@@@{@oriUser.NickName;}</a>：@{@MvcHtmlString.Create(string.IsNullOrEmpty(Model.Key) ? ocontent : HighLineHelper.HighLine(ocontent, Model.Key));}</p>
                                                            <div id="prev_@{@m.ID;}" class="feed_preview" mbind="1" style="">
                                                                @{
                                                                                 if (omedia[0] != "-1")
                                                                                 {

                                                                    <div class="feed_img">
                                                                        <a href="javascript:;" onclick="App.scaleImg(this,'@{@m.ID;}');return false;">
                                                                            <img vimg="1" class="imgicon" src="@{@omedia[4];}" /></a>
                                                                        <img src="/Content/Image/loading.gif" style="position: absolute; background-color: transparent;
                                                                            border: 0px none; width: 16px; height: 16px; z-index: 1001; display: none;" />
                                                                    </div>
                                                                                 }
                                                                                 if (omedia[1] != "-1")
                                                                                 {
                                                                    <div class="feed_img" type="video" vid="@{@omedia[1];}" mid="@{@m.ID;}" style="width: 120px; height: 90px;">
                                                                        <a onclick="return false;" href="#">
                                                                            <img width="120" height="90" style="cursor: pointer;" class="imgicon"
                                                                    src="@{@omedia[5];}" /></a><img src="/Content/Image/feedvideoplay.gif" onmouseover="App.mouseoverIco(this);" onmouseout="App.mouseoutIco(this);"  style="cursor: pointer;
                                                                        display: block; margin-top: -61.5px; margin-left: 43.5px; opacity: 0.5; filter: alpha(opacity=50);" /></div>
                                                                                 }
                                                                                 if (omedia[2] != "-1")
                                                                                 {
                                                                    <div class="feed_img" type="music" musicid="@{@omedia[2];}" mid="@{@m.ID;}" style="width: 135px; height: 33px;">
                                                                        <a onclick="return false;" href="#">
                                                                            <img style="cursor: pointer;" class="imgicon" src="/Content/Image/music_s.gif" /></a></div>
                                                                                 }
                                                                                 if (omedia[3] != "-1")
                                                                                 {
                                                                    if(!string.IsNullOrEmpty(omedia[6]))
                                                                                 
                                                                             {
                                                                    <div class="feed_img" type="vote" voteid="@{@omedia[3];}" mid="@{@m.ID;}" >
                                                                        <a onclick="return false;" href="#">
                                                                            <img style="cursor: pointer;" class="imgicon" src="@{@omedia[6];}" /></a><img onmouseover="App.mouseoverIco(this);" onmouseout="App.mouseoutIco(this);"  src="/Content/Image/vote_picicon_01.gif"
                                                                                style="cursor: pointer; display: none;
                                                                                opacity: 0.5; filter: alpha(opacity=50);"></div>
                                                                             }
                                                                    else
                                                                    {
                                                                    <div class="feed_img" type="vote" voteid="@{@omedia[3];}" mid="@{@m.ID;}"  style="width: 120px; height: 90px;">
                                                                        <a onclick="return false;" href="#">
                                                                            <img style="cursor: pointer;" class="imgicon" src="/Content/Image/vote_pic_01.gif" /></a></div>
                                                                    }
                                                                                 }
                                                                }
                                                                <div class="clear">
                                                                </div>
                                                            </div>
                                                            <div style=" display: none;" id="disp_@{@m.ID;}" class="blogPicOri">
                                                            </div>
                                                            <div class="feed_att MIB_linkbl MIB_txtbl">
                                                                <div class="lf">
                                                                    <cite><a  href="/@{@oriUser.ID;}/@{@oriMBlog.IDCode;}"><strong>
                                                                        @{@odateSpan;}
                                                                    </strong></a></cite><strong>来自</strong><cite><a
                                                                            target="_blank" href="@{@ofrom.FromUrl;}">@{@ofrom.FromName;}
                                                                    </a></cite>
                                                                </div>
                                                                <div class="rt">
                                                                    <a  href="/@{@oriUser.ID;}/@{@oriMBlog.IDCode;}">转发@{
                                                                                                                 if (oriMBlog.QuoteCount > 0)
                                                                                                                 {<strong type="rttCount">(@{@oriMBlog.QuoteCount;})</strong>
                                                                                                                 }
                                                                        }
                                                                    </a><span class="MIB_line_l">|</span> <a  href="/@{@oriUser.ID;}/@{@oriMBlog.IDCode;}">
                                                                        评论@{
                                                                                                                                                       if (oriMBlog.CommentCount > 0)
                                                                                                                                                       {<strong type="commtCount" >(@{@oriMBlog.CommentCount;})</strong>
                                                                                                                                                       }
                                                                        }
                                                                    </a>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="MIB_assign_b">
                                                        </div>
                                                    </div>
                                                                                                 }
                                                                                             }
                                                                                             else
                                                                                             {
                                                    <div class="MIB_assign">
                                                        <div class="MIB_asarrow_l">
                                                        </div>
                                                        <div class="MIB_assign_t">
                                                        </div>
                                                        <div class="MIB_assign_c MIB_txtbl">
                                                            <p class="source">
                                                                该微博已被删除</p>
                                                        </div>
                                                        <div class="MIB_assign_b">
                                                        </div>
                                                    </div>
                                                                                             }
                                                                                         }
                                                }
                                                <!-- 转发 -->
                                                <!-- 转发 -->
                                                <div class="feed_att MIB_linkbl MIB_txtbl">
                                                    <div class="lf">
                                                        <cite><a  href="/@{@user.ID;}/@{@m.IDCode;}"><strong>
                                                            @{@dateSpan;}
                                                        </strong></a></cite><strong>来自</strong><cite><a
                                                                 target="_blank" href="@{@from.FromUrl;}">@{@from.FromName;}
                                                        </a></cite>
                                                    </div>
                                                    <div class="rt">
                                                        <!-- 转发 -->
                                                        @{
                                                                                                                          if (user.ID == Model.CurUser.ID)
                                                                                                                          {
                                                            <strong><a onclick="App.miniblogDel('@{@m.ID;}',this)" href="javascript:void(0);"><strong>
                                                                删除</strong></a><span class="MIB_line_l">|</span></strong>
                                                                                                                          }
                                                        }
                                                        <a onclick="App.showFeedDiv('@{@m.ID;}',@{@m.IsOriginal;},'@{@m.OriginalMID;}');return false;"
                                                            href="javascript:void(0);"><strong lang="CD0023">转发</strong>@{
                                                                                                                                   if (m.QuoteCount > 0)
                                                                                                                                   {<strong type="rttCount"id="num_@{@m.ID;}">(@{@m.QuoteCount;})</strong>
                                                                                                                                   }
                                                            }
                                                        </a>
                                                        <!-- 转发 -->
                                                        <span class="MIB_line_l">|</span> <a onclick="App.AddFavorite(@{@Model.CurUser.ID},@{@m.ID;},this);return false;"
                                                            href="javascript:void(0);"><strong lang="CL1003">收藏</strong></a>
                                                        <!-- 评论 -->
                                                        <span class="MIB_line_l">|</span> <a onclick="App.InsertCommentBox('@{@m.ID;}','@{@user.ID}')"
                                                            href="javascript:void(0);" id="comment_count_@{@m.ID;}"><strong>评论</strong>@{
                                                                                                                if (m.CommentCount > 0)
                                                                                                                {<strong>(@{@m.CommentCount;})</strong>
                                                                                                                }
                                                            }
                                                        </a>
                                                        <!-- 评论 -->
                                                    </div>
                                                </div>
                                                <div id="comment_list_@{@m.ID;}">
                                                </div>
                                            </div>
                                        </li>
                                                    }
                                                }
                                            }
                                        }
                                    }
                                </ul>
								<div class="MIB_bobar">@Html.Pager(Model.Page,Model.RecordCount,Model.PageSize)
</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

